package com.sz.hiling.service.impl;

import com.sz.hiling.mapper.UserMapper;
import com.sz.hiling.model.User;
import com.sz.hiling.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> findAllUsers() {
        return userMapper.selectAll();
    }

    @Override
    public int deleteUserById(Integer userid) {
        return userMapper.deleteByPrimaryKey(userid);
    }
}
